/**
 * SPDX-FileCopyrightText: 2023-2025 Sangfor Technologies Inc.
 * SPDX-License-Identifier: Mulan PSL v2
 */
.border(1);

.border(@n, @i: 0) when (@i =< @n) {
    .b-r@{i} {
        border-right: @i * 1px solid #ddd;
    }

    .b-l@{i} {
        border-left: @i * 1px solid #ddd;
    }

    .b-t@{i} {
        border-top: @i * 1px solid #ddd;
    }

    .b-b@{i} {
        border-bottom: @i * 1px solid #ddd;
    }

    .b-a@{i} {
        border: @i * 1px solid #ddd;
    }

    .border(@n, (@i + 1));
}


.margin-padding(30);

.margin-padding(@n, @i: 0) when (@i =< @n) {
    .m-r@{i} {
        margin-right: @i * 1px;
    }

    .m-l@{i} {
        margin-left: @i * 1px;
    }

    .m-t@{i} {
        margin-top: @i * 1px;
    }

    .m-b@{i} {
        margin-bottom: @i * 1px;
    }

    .m-tb@{i} {
        margin: @i * 1px 0;
    }

    .m-lr@{i} {
        margin: 0 @i * 1px;
    }

    .m-a@{i} {
        margin: @i * 1px;
    }

    .p-r@{i} {
        padding-right: @i * 1px;
    }

    .p-l@{i} {
        padding-left: @i * 1px;
    }

    .p-t@{i} {
        padding-top: @i * 1px;
    }

    .p-b@{i} {
        padding-bottom: @i * 1px;
    }

    .p-tb@{i} {
        padding: @i * 1px 0;
    }

    .p-lr@{i} {
        padding: 0 @i * 1px;
    }

    .p-a@{i} {
        padding: @i * 1px;
    }

    .margin-padding(@n, (@i + 5));
}
